
<%=link_to  '编辑解释' , :action=>"new_norm" , :id=>@test.id%> >> </p><br/>
<br />

<div>
  <% for norm in @test.norms -%>
  <div id="">
    <p>
      <strong><%= norm.begin_num %>&nbsp;~&nbsp;<%= norm.end_num %></strong>&nbsp;&nbsp;&nbsp;&nbsp;
      <%= link_to "删除", :action => "delete_norm", :id => norm.id %>
    </p>
    <pre style="padding:0px;">
      <%= norm.explanation %>
    </pre>
    <br/>
  </div>
  <% end -%>
</div>


<strong>添加解释</strong><br/>

<% form_for(@norm, :url => { :action => "create_norm" }) do |f| %>
  <%= hidden_field_tag "test_id", @test.id %>
  
  <p>
    计分范围:
  </p>
  <p>
    大于<%= f.text_field :begin_num, :size => 6  %>
        <%= error_message_on :norm, :begin_num -%>
  </p>
  <p>
    小于<%= f.text_field :end_num, :size => 6  %>
        <%= error_message_on :norm, :end_num -%>
  </p>
  <p>
    <%= f.label "解释" %><br />
    <%= f.text_area :explanation, :cols => 60, :rows => 12 %>
    <%= error_message_on :norm, :explanation -%>
  </p>
  <br/>
  <p>
    <%= f.submit "保存" %>
  </p>

<% end %>
